<ion-view view-title="绑定快捷支付" cache-view="false">
    <ion-nav-buttons>
        <exit-button ng-show="param.b != 2"></exit-button>
    </ion-nav-buttons>
    <ion-content ng-class="{'has-loading': isOffline}">
        <!-- step -->
        <div class="step">
            <ol class="clearfix">
                <li class="lit">基本信息<em>1</em></li>
                <li class="lit">身份验证<em>2</em></li>
                <li>完成申请<em>√</em></li>
            </ol>
            <p><i style="width:87.5%"></i></p>
        </div>
        <!-- panel -->
        <div class="panel tp" ng-show="param.step == 1">
            <a ng-click="showBankClick()">
                <div class="item group">
                    <span class="title">选择银行</span>
                    <span ng-class="{'txt_m':true,'placeholder':!param.bank_no}" ng-model="param.bank_name">{{param.bank_name}}</span>
                </div>
            </a>
            <div class="item">
                <span class="title">银行卡号</span>
                <input type="tel" class="txt_m jBankCard" ng-model="param.bank_account" placeholder="请输入银行卡卡号" maxlength="23" />
            </div>
        </div>
        <!-- panel -->
        <div class="agree item grp" ng-show="param.step == 1 && param.bank_no">
            <ion-checkbox ng-model="param.agreement"></ion-checkbox>
            <a href="#/trade/agreement?id={{param.econtract_id}}" ng-click="saveBankInfo()">我已阅读并同意签署《天风证券快捷支付协议》</a>
        </div>
        <!-- panel -->
        <div class="little-tip" ng-show="param.step == 1 && param.bank_no">
            <p><img src="../../common/img/jkf/kh/unionpay.png" height="30" alt="银联" /></p>
            为保证您的银行卡资金安全，现在请您去银联进行身份验证。验证过程中，银行卡密码为中国银联直接加密校验，您不必担心密码外泄。
        </div>
        <!-- panel -->
        <div class="btnbox" ng-show="param.step == 1">
            <a id="bindBtn" class="btn" ng-click="bindBankClick()">去银联校验身份</a>
        </div>
        <!-- panel -->
        <div ng-show="param.step == 2 && param.bind_success">
            <div class="panel confirm success">
                <dl>
                    <dt>绑定成功！</dt>
                    <dd ng-bind-html="param.success_info"></dd>
                </dl>
            </div>
            <!-- button -->
            <div class="btnbox">
                <a ng-click="onBackKeyDown()" class="btn">确定</a>
            </div>
        </div>
        <!-- panel -->
        <div ng-show="param.step == 2 && !param.bind_success">
            <div class="panel confirm fail">
                <dl>
                    <dt>快捷支付银行卡绑定失败！</dt>
                    <dd>{{param.error_info}}</dd>
                </dl>
            </div>
            <!-- button -->
            <div class="btnbox">
                <a ng-click="reBind()" class="btn">重新绑定支付银行卡</a>
            </div>
        </div>
    </ion-content>
</ion-view>